package me.zhengjie.inter.rest;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.business.service.OrderService;
import me.zhengjie.business.service.dto.OrderQueryCriteria;
import me.zhengjie.utils.PageUtil;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

/**
 * @author lyl
 * @since 2023/11/16
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "移动端经纬度测算")
@RequestMapping("/mp/jwd")
public class MpLocationController {

    private final OrderService orderService;

    @PostMapping(value = "/getZhJWDtest")
    @ApiOperation("经纬度测试")
    public ResponseEntity<Object> getZhJWDtest(@Validated @RequestBody OrderQueryCriteria criteria) {
        Object page = orderService.getZhJWDtest(criteria.getBisOrderZhid(),criteria.getOrdjd(),criteria.getOrdwd());
        return new ResponseEntity<>(PageUtil.toMpContent(page),HttpStatus.OK);
    }

}
